New variable 'project-files-relative-names'
authorDmitry Gutov <dmitry@gutov.dev>
Sun, 5 May 2024 03:27:39 +0000 (06:27 +0300)
committerDmitry Gutov <dmitry@gutov.dev>
Sun, 5 May 2024 03:27:55 +0000 (06:27 +0300)
commit370b216f08699bdd85b910868642df441c06306c
treef921865be391b559bc69ebc5ceabfa3b3869f792
parente0993f5169ebf761d520b2e23630a3de7d13ccb3
New variable 'project-files-relative-names'

* lisp/progmodes/project.el (project-files-relative-names):
New variable (bug#69233).
(project--files-in-directory): Honor it.
(project--vc-list-files): Here too.
(project-find-regexp): Use it to improve performance.
(project-or-external-find-regexp): Add a TODO.
(project-find-file): Use it here too.
(project--read-file-cpd-relative, project--read-file-absolute):
Try to handle file lists with absolute and relative files names.
(project-find-file-in): Set default-directory, so relative names
are interpreted correctly.

* lisp/progmodes/xref.el (xref-matches-in-files):
Consider that the first in FILES can be a relative file name.

* test/lisp/progmodes/project-tests.el (project-find-regexp):
New test.

* etc/NEWS: Mention it.
etc/NEWS
lisp/progmodes/project.el
lisp/progmodes/xref.el
test/lisp/progmodes/project-tests.el